Accelerator B2B Simulator Process API - Implementation Template

(0 reviews)

Data mappings

This document provides information generated from the DataWeave scripts included in the project, such as function definitions, variable definitions, and data mapping tables.

ModuleDescription
order-shipped-eventCreate an OrderShippedEvent from Fulfillment Orders
invoice-810-to-cimMaps X12 Message to CIM OrderInvoiceNotice
cim-to-820-paymentMaps CIM OrderInvoiceNotice to X12 8020 Message

order-shipped-event

Create an OrderShippedEvent from Fulfillment Orders

Source: ./src/main/resources/dwl/order-shipped-event.dwl

Variables

var groupFulfillmentOrderByToLocation

Grouping of Fulfillment Orders that has same Location Code or Address Line1 to simulate creation of OrderShippedEvent per address.

The assumption is that fulfillment orders may belong to different orders but if they have same address and they can be shipped together as one shipment.

var packageIds

Generates a packageId for all FulfillmentOrderProducts that belong to a FulfillmentOrder. The requirement is to create a Shipment for

each Address even if the fulfillment Orders belong to different Sales Orders. In Case of OMS the Order Allocation Notice will hold multiple

fulfillment orders for the same Order Summary and each fulfillment Order has a different address.

Functions

fun auditInfo ()

Create a new audit block

Mapping Tables

Maps CIM Fulfillment Orders to a new OrderShippedEvent

CIM OrderShippedEventCIM Fulfillment OrderDescription
idfulfillmentOrders.salesOrderIdSales Order ID
orderEventType"OrderShippedEvent"Defaulted to OrderShippedEvent
purchasingOrganizationCodepurchasingOrganizationCodeOrganization Code of Purchase Order
fulfillmentOrdersfulfillmentOrdersFulfillment Orders as received from incoming request or as per ERP
shipment.iduuidA unique Id for Shipment
shipment.shipmentNumber"SP-10000000"A unique number generated for each Shipment in format of "SP-"
shipment.shipmentDate(now()) as DateSimulated as Shipment Date
shipment.shipToLocationfulfillmentOrders[0].fulfilledToLocationLocation based on Fulfillment Order
shipments.fulfillmentOrderIdfulfillmentOrders.IdId of the Fulfillment Order
shipments.falesOrderIdfulfillmentOrders.SalesOrderIdSales Order Id of the fulfillment Order
shipment.orderDeliveryMethodIdfulfillmentOrders.OrderDeliveryMethodIdDelivery Method associated with Account
shipment.isGiftFalseDefault value as false
shipment.shipmentStatusDISPATCHEDStatus marked as Dispatched
shipment.scheduledDeliveryDateTime3DIn next 3 days
shipment.estimatedDeliveryDateTime3DIn next 3 days
shipment.carrierTrackingNumberuuidUUID with '-' removed for each Shipment
shipment.specialInstructionsTextNoneDefault message if any
shipmentDocuments.iduuidUUID for Shipment Document based on Fulfillment Order
shipmentDocuments.contentDocumentVersion1.0Default version as 1.0
shipmentDocuments.shipmentPackageIduuidUUID for Shipment Package based on Fulfillment Order
shipmentPackages.iduuidUUID for Shipment Package based on Fulfillment Order
shipmentPackages.ShipmentProductCountfulfillmentOrdersCount of Products in each fulfillment order
shipmentProducts.idfulfillmentOrders.salesOrderProductIdProduct Id of products in each fulfillment order
shipmentProducts.productCodefulfillmentOrders.productCodeProduct Code of products in each fulfillment order
shipmentProducts.fulfillmentOrderProductIdfulfillmentOrders.IdProduct Id of products in each fulfillment order
shipmentProducts.quantityfulfillmentOrders.fulfilledQuantityQuantity for each product in each fulfillment order
shipmentProducts.shipmentPackageIdfulfillmentOrders.IdUUID for Shipment Package based on Fulfillment Order

(back to top)

invoice-810-to-cim

Maps X12 Message to CIM OrderInvoiceNotice

Source: ./src/main/resources/dwl/invoice-810-to-cim.dwl

Mapping Tables

Maps X12 8010 Message to CIM Order InvoiceNotice

CIM Order InvoiceNoticeX12 8010 MessageDescription
iduuidA unique id for Invoice
purchaseOrderNumberTransactionSets.v004010."810".Heading."020_BIG".BIG04Purchase Order associated with Invoice
purchaseOrderDateTransactionSets.v004010."810"[0].Heading."020_BIG".BIG03Date of Purchase Order
purchasingOrganizationCodeTransactionSets.v004010."810".Group.GS03Organization Code of Purchase Order
invoices.iduuidUnique Id as referenced for each Invoice
invoices.invoiceNumberTransactionSets.v004010."810".Heading."050_REF".REF01.REF02Invoice Number as referenced for each Invoice
invoices.purchaseOrderNumberTransactionSets.v004010."810".Heading."050_REF".REF01.REF02Purchase Order Number as referenced for each Invoice
invoices.billToCustomerIdTransactionSets.v004010."810".Group.GS03Customer Id referenced for each Invoice
invoices.invoiceStatusValidDefault Status for Invoice
invoices.invoiceDateTransactionSets.v004010."810".Heading."020_BIG"."BIG01"Date of Invoice
invoices.invoiceAmountTransactionSets.v004010."810".Summary."010_TDS".TDS01Amount on Invoice

(back to top)

cim-to-820-payment

Maps CIM OrderInvoiceNotice to X12 8020 Message

Source: ./src/main/resources/dwl/cim-to-820-payment.dwl

Mapping Tables

Maps CIM Order InvoiceNotice to X12 8020 Message

X12 8020 MessageCIM Order InvoiceNoticeDescription
iduuidA unique id for Invoice
purchaseOrderNumberTransactionSets.v004010."810".Heading."020_BIG".BIG04Purchase Order associated with Invoice
purchaseOrderDateTransactionSets.v004010."810".Heading."020_BIG".BIG03Date of Purchase Order
Interchange.ISA06purchasingOrganizationCodeOrganization Code on Purchase Order
Interchange.ISA08Supplier IdSupplier Id from configurations
Interchange.ISA09nowCurrent Date
Interchange.ISA10nowCurrent Time in HHmm format
Group.GS02Supplier IdSupplier Id from configurations
Group.GS03nowCurrent Date
Group.GS04nowCurrent Time in HHmmss format
TransactionSets.v004010.820.Heading.BPR02invoiceAmountInvoice Amount
TransactionSets.v004010.820.Heading.020_BPR.BPR02invoiceAmountInvoice Amount
TransactionSets.v004010.820.Heading.050_REF.REF02purchaseOrderNumberOrganization Code of Purchase Order
TransactionSets.v004010.820.Detail.010_ENT_Loop.ENT04purchasingOrganizationCodeOrganization Code on Purchase Order
TransactionSets.v004010.820.Detail.010_ENT_Loop.ENT04.150_RMR_Loop.150_RMR.RMR02invoiceAmountInvoice Amount
TransactionSets.v004010.820.Detail.010_ENT_Loop.ENT04.150_RMR_Loop.150_RMR.RMR04invoiceAmountInvoice Amount
TransactionSets.v004010.820.Detail.010_ENT_Loop.ENT04.150_RMR_Loop.150_RMR.RMR05invoiceAmountInvoice Amount

(back to top)


Reviews

TypeTemplate
OrganizationMuleSoft
Published by
MuleSoft Solutions
Published onApr 18, 2024
Asset overview

Asset versions for 1.0.x

Asset versions
VersionActions
1.0.11